package com.serene.im.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.serene.im.pojo.ImChatMsgLogs;

import java.util.List;

/**
 * <p>
 * im_chat聊天记录 服务类
 * </p>
 *
 * @author serene
 * @since 2020-05-26
 */
public interface ImChatMsgLogsService extends IService<ImChatMsgLogs> {

    /**
     * 添加聊天消息
     *
     * @param imChatMsgLogs 聊天记录类
     * @return
     */
    public Integer saveWebMsgLogs(ImChatMsgLogs imChatMsgLogs);

    /**
     * 修改是否在线状态为离线
     *
     * @param msgId 签收id
     * @return
     */
    public Integer updateOfflineStatusTwo(Integer msgId);

    /**
     * 消息读取
     *
     * @param msgIdList 签收id List
     */
    public void updateMsgReadStatusOne(List<String> msgIdList);

    /**
     * 查询好友聊天记录
     *
     * @param sendId    发送者id
     * @param receiveId 接收者id
     * @return
     */
    public List<ImChatMsgLogs> queryFriendLogsList(String sendId, String receiveId);

    /**
     * 根据群id查询群信息记录
     *
     * @param groupInfoId 群id
     * @return
     */
    public List<ImChatMsgLogs> queryImChatMsgLogsListByGroupInfoId(Integer groupInfoId);

    /**
     * 根据接收者id读取消息
     *
     * @param imChatMsgLogs 聊天记录类
     * @return
     */
    public Integer updateImChatMsgListById(ImChatMsgLogs imChatMsgLogs);
}
